
/**
 * BaseController 基类
 * 构造函数初始化db,logger属性
 */
class BaseController {
  constructor(context = {}) {
    this.utils = context.utils;
    this.config = context.config;

    // this.code = code;
  }

  getModel(ctx, model) {
    const MODEL = ctx.app.model;
    return new(MODEL[model])(ctx.context);
  }
}

module.exports = BaseController;
